<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity3"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="/common/head :: head" />
<body class="gray-bg">
<div class="wrapper wrapper-content animated fadeInRight">
<div class="ibox float-e-margins">
    <div class="ibox-content">
        <div class="form-horizontal" id="deptForm">
            <input id="id" th:value="${dept.id}" type="hidden">
            <div class="row">
                <div class="col-sm-12">
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">部门名称</label>
                        <div class="col-sm-6">
                            <input class="form-control" id="name" name="name" th:value="${dept.name}" type="text">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">上级部门</label>
                        <div class="col-sm-6">
                            <input class="form-control" id="parentName" name="parentName" th:value="${dept.parentName}" type="text" readonly="readonly" onclick="DeptDlg.showParentNameSelectTree(); return false;" style="background-color: #ffffff !important;">
                            <input class="form-control" id="parentId" th:value="${dept.parentId}" type="hidden">
                        </div>
                    </div>
                    <div class="hr-line-dashed"></div>
                    <div class="form-group">
                        <label class="col-sm-3 control-label">排序</label>
                        <div class="col-sm-6">
                            <input class="form-control" id="num" name="num" th:value="${dept.num}" type="number">
                        </div>
                    </div>
                </div>
            </div>

            <!-- 父级部门的选择框 -->
            <div id="parentNameContent" style="display: none; position: absolute; z-index: 200;">
                <ul id="parentNameTree" class="ztree tree-box" style="width: 245px !important;"></ul>
            </div>

            <div class="row btn-group-m-t">
                <div class="col-sm-10">
                    <button type="button" class="btn btn-info" shiro:hasPermission ="/dept/update" onclick="DeptDlg.editDeptSubmit()">
                        <i class="fa fa-check"></i>&nbsp;提交
                    </button>
                    <button type="button" class="btn btn-danger" onclick="DeptDlg.close()">
                        <i class="fa fa-eraser"></i>&nbsp;取消
                    </button>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
<footer th:replace="/common/footer :: footer"></footer>
<script th:src="@{/js/system/dept/dept-dlg.js}"></script>
</body>
</html>
